home *** CD-ROM | disk | FTP | other *** search
- package symantec.itools.db.awt;
-
- import java.awt.Color;
- import java.awt.Font;
- import java.awt.Graphics;
- import java.awt.Rectangle;
-
- public class CellHints {
- Rectangle bounds = new Rectangle();
- int align;
- int valign;
- boolean editable = true;
- boolean visible = true;
- Font font;
- // $FF: renamed from: fg java.awt.Color
- Color field_0;
- // $FF: renamed from: bg java.awt.Color
- Color field_1;
- Color hfg;
- Color hbg;
- boolean highlighted;
- boolean lineTop;
- boolean lineBottom;
- boolean lineLeft;
- boolean lineRight;
- int lineTopStyle;
- int lineBottomStyle;
- int lineLeftStyle;
- int lineRightStyle;
- Color lineTopColor;
- Color lineBottomColor;
- Color lineLeftColor;
- Color lineRightColor;
- TableCell defaultCell;
- public static Font stdFont = new Font("Dialog", 0, 12);
- Grid view;
- TableCell cell;
-
- public CellHints(Grid v) {
- this.font = stdFont;
- this.field_0 = Color.black;
- this.field_1 = Color.white;
- this.hfg = Color.white;
- this.hbg = Color.blue;
- this.highlighted = false;
- this.lineTop = true;
- this.lineBottom = true;
- this.lineLeft = true;
- this.lineRight = true;
- this.lineTopStyle = 1;
- this.lineBottomStyle = 1;
- this.lineLeftStyle = 1;
- this.lineRightStyle = 1;
- this.lineTopColor = Color.gray;
- this.lineBottomColor = Color.gray;
- this.lineLeftColor = Color.gray;
- this.lineRightColor = Color.gray;
- this.view = v;
- }
-
- public void setForeground(Graphics g) {
- if (this.highlighted) {
- g.setColor(this.hfg);
- } else {
- g.setColor(this.field_0);
- }
- }
-
- public void setBackground(Graphics g) {
- if (this.highlighted) {
- g.setColor(this.hbg);
- } else {
- g.setColor(this.field_1);
- }
- }
-
- public void setHints(TableCell c) {
- this.cell = c;
- this.bounds = this.view.getCellBounds(c, this.bounds);
- this.align = this.view.getCellAlignment(c);
- this.field_0 = this.view.getCellFG(c);
- this.field_1 = this.view.getCellBG(c);
- this.editable = this.view.getCellEditable(c);
- this.highlighted = this.view.getCellHighlighted(c);
- this.font = this.view.getCellFont(c);
- }
-
- public void drawBoundary(Graphics g) {
- Rectangle r = this.bounds;
- if (this.lineTop) {
- g.setColor(this.lineTopColor);
- g.drawLine(r.x, r.y, r.x + r.width - 1, r.y);
- }
-
- if (this.lineBottom) {
- g.setColor(this.lineBottomColor);
- g.drawLine(r.x, r.y + r.height - 1, r.x + r.width - 1, r.y + r.height - 1);
- }
-
- if (this.lineLeft) {
- g.setColor(this.lineLeftColor);
- g.drawLine(r.x, r.y, r.x, r.y + r.height - 1);
- }
-
- if (this.lineRight) {
- g.setColor(this.lineRightColor);
- g.drawLine(r.x + r.width - 1, r.y, r.x + r.width - 1, r.y + r.height - 1);
- }
-
- }
-
- public boolean isVisible() {
- return this.visible;
- }
-
- public Rectangle bounds() {
- return this.bounds;
- }
-
- public int alignment() {
- return this.align;
- }
-
- public boolean editable() {
- return this.editable;
- }
-
- public int vAlignment() {
- return this.valign;
- }
-
- public Font font() {
- return this.font;
- }
-
- public Color foreground() {
- return this.field_0;
- }
-
- public Color background() {
- return this.field_1;
- }
-
- public boolean highlighted() {
- return this.highlighted;
- }
-
- public Color hlForeground() {
- return this.hfg;
- }
-
- public Color hlBackground() {
- return this.hbg;
- }
-
- public boolean lineTop() {
- return this.lineTop;
- }
-
- public boolean lineBottom() {
- return this.lineBottom;
- }
-
- public boolean lineLeft() {
- return this.lineLeft;
- }
-
- public boolean lineRight() {
- return this.lineRight;
- }
-
- public Color lineTopColor() {
- return this.lineTopColor;
- }
-
- public Color lineBottomColor() {
- return this.lineBottomColor;
- }
-
- public Color lineLeftColor() {
- return this.lineLeftColor;
- }
-
- public Color lineRightColor() {
- return this.lineRightColor;
- }
-
- public int lineTopStyle() {
- return this.lineTopStyle;
- }
-
- public int lineBottomStyle() {
- return this.lineBottomStyle;
- }
-
- public int lineLeftStyle() {
- return this.lineLeftStyle;
- }
-
- public int lineRightStyle() {
- return this.lineRightStyle;
- }
- }
-